<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
    
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <title>
            <?php echo $title; ?>-<?php echo C('SITE_NAME'); ?>
        </title>
        <link rel="stylesheet" href="//at.alicdn.com/t/font_001z27klwvobt9.css">
        <link rel="stylesheet" href="/P201606/bbs/Public/css/layui.css">
        <link rel="stylesheet" href="/P201606/bbs/Public/css/global.css">
        <script src="/P201606/bbs/Public/layui.js"></script>
        <script type="text/javascript" src="//cdn.bootcss.com/jquery/3.1.1/jquery.min.js"></script>
    </head>
    
    <body>
        <div class="header">
            <div class="main">
                <a class="logo" href="<?php echo U('home/index/index');?>" title="Fly">
                    Fly社区
                </a>
                <div class="nav">
                    <a href="/<?php echo U('home/index/index');?>">
                        <i class="iconfont icon-wenda">
                        </i>
                        问答
                    </a>
                    <a href="<?php echo U('home/index/index');?>">
                        <i class="iconfont icon-iconmingxinganli" style="top: 2px;">
                        </i>
                        案例
                    </a>
                    <a href="<?php echo U('home/index/index');?>">
                        <i class="iconfont icon-ui">
                        </i>
                        框架
                    </a>
                </div>
                <div class="nav-user">
                    <?php if(isset($_SESSION['nikename'])){ ?>

                    <a class="avatar" href="<?php echo U('home/u/index');?>">
                        <img class="face" src="/P201606/bbs/<?php echo $_SESSION['face'] ?>">
                        <cite>
                            <?php echo $_SESSION['nikename'] ?>
                        </cite>
                    </a>
                    <div class="nav">
                        <a href="<?php echo U('home/set/set');?>">
                            <i class="iconfont icon-shezhi">
                            </i>
                            设置
                        </a>
                        <a href="<?php echo U('home/login/loginout');?>">
                            <i class="iconfont icon-tuichu" style="top: 0; font-size: 22px;">
                            </i>
                            退了
                        </a>
                    </div>

                    <?php }else{ ?>

                    <a class="unlogin" href="<?php echo U('home/login/index');?>">
                        <i class="iconfont icon-touxiang">
                        </i>
                    </a>
                    <span>
                        <a href="<?php echo U('home/login/index');?>">
                            登入
                        </a>
                        <a href="<?php echo U('home/reg/index');?>">
                            注册
                        </a>
                    </span>
                    <p class="out-login">
                        <?php if(C('IS_QQLOGIN')){ ?>

                         
                        <a href="<?php echo U('home/login/qqlogin');?>" onclick="layer.msg('正在通过QQ登入', {icon:16, shade: 0.1, time:0})"
                        class="iconfont icon-qq" title="QQ登入">
                        </a>

                        <?php  } ?>
                        <a href="http://fly.layui.com:8098/app/weibo/" onclick="layer.msg('正在通过微博登入', {icon:16, shade: 0.1, time:0})"
                        class="iconfont icon-weibo" title="微博登入">
                        </a>
                    </p>

                    <?php } ?>
                </div>
            </div>
        </div>
        <div class="main layui-clear">
    <div class="wrap">
        <div class="content">
            <div class="fly-tab">
                <span>
                    <a href="/jie/">
                        全部
                    </a>
                    <a href="/jie/unsolved/">
                        未结帖
                    </a>
                    <a href="/jie/solved/">
                        已采纳
                    </a>
                    <a href="/jie/wonderful/">
                        精帖
                    </a>
                    <a href="/user/">
                        我的帖
                    </a>
                </span>
                <form action="<?php echo U('home/s/index');?>" class="fly-search">
                    <i class="iconfont icon-sousuo">
                    </i>
                    <input class="layui-input" autocomplete="off" placeholder="搜索内容，回车跳转"
                    type="text" name="w">
                </form>
                <a href="<?php echo U('home/question/add');?>" class="layui-btn jie-add">
                    发布问题
                </a>
            </div>
            <ul class="fly-list">
                <?php foreach ($q as $list) { ?>
                <li class="fly-list-li">
                    <a href="/u/1535352" class="fly-list-avatar">
                        <img src="/P201606/bbs/<?php echo $list['face'] ?>" alt="lostincoding">
                    </a>
                    <h2 class="fly-tip">
                        <a href="<?php echo U('home/question/index',array('id'=>$list['id']));?>">
                            <?php echo $list['title'] ?>
                        </a>

                        <?php if(strstr($list['status'], "置顶")) { ?>
                            <span class="fly-tip-stick">
                                置顶
                            </span>

                        <?php }?>
                        <?php if(strstr($list['status'], "精华")) { ?>
                            <span class="fly-tip-jing">
                            精帖
                            </span>

                        <?php }?>
                        
                        
                    </h2>
                    <p>
                        <span>
                            <a href="/u/1535352">
                                <?php echo $list['nikename'] ?>
                            </a>
                        </span>
                        <span>
                            <?php echo getFormate($list['create_time']) ?>
                        </span>
                        <span>
                            <?php echo $list['cname'] ?>
                        </span>
                        <span class="fly-list-hint">
                            <i class="iconfont" title="回答">
                                
                            </i>
                            <?php echo $list['answer_num'] ?>
                            <i class="iconfont" title="人气">
                                
                            </i>
                            <?php echo $list['view_num'] ?>
                        </span>
                    </p>
                </li>
                <?php } ?>
            </ul>
            <div style="text-align: center">
               <!--  <div class="laypage-main">
                    <a href="/jie/page/2/" class="laypage-next">
                        更多求解
                    </a>

                </div> -->
                <style type="text/css">
                    .xbs-pages{
                        margin-top: 20px;
                    }
                    .xbs-pages div a,.xbs-pages div span{
                        display: inline-block;
                        padding: 5px 10px;
                        margin-right: 5px;
                        border: 1px solid #1AA094;
                    }
                    .xbs-pages div span{
                        background: #1AA094 url() 0 0 no-repeat;
                        color: #fff;
                    }
                </style>
                <div class="xbs-pages">
                    <?php echo $page ?>
                </div>
                
            </div>
        </div>
    </div>
    <div class="edge">
        <h3 class="page-title">
            最近一月回答榜 - TOP 12
        </h3>
        <div class="user-looklog leifeng-rank">
            <span>
                <?php foreach ($users as $user) { ?>
                <a href="<?php echo U('home/u/index',array('uid'=>$user['id']));?>">
                    <img src="/P201606/bbs/<?php echo $user['face'] ?>">
                    <cite>
                        <?php echo $user['nikename'] ?>
                    </cite>
                    <i>
                        <?php echo $user['cn'] ?>次回答
                    </i>
                </a>
                <?php } ?>
            </span>
        </div>
        <h3 class="page-title">
            最近热帖
        </h3>
        <ol class="fly-list-one">
            <?php foreach ($hots as $hot) { ?>
                <li>
                <a href="/jie/6190.html">
                    <?php echo $hot['title'] ?>
                </a>
                <span>
                    <i class="iconfont">
                        
                    </i>
                    <?php echo $hot['answer_num'] ?>
                </span>
            </li>
            <?php } ?>
        </ol>
        <h3 class="page-title">
            近期热议
        </h3>
        <ol class="fly-list-one">
            <li>
                <a href="/jie/6190.html">
                    目前授权LayIM 3.0可附赠一套Nifty Admin后台模版管理系统
                </a>
                <span>
                    <i class="iconfont">
                        
                    </i>
                    20
                </span>
            </li>
        </ol>
        <div class="fly-link">
            <span>
                友情链接：
            </span>
            <a href="http://layim.layui.com/" target="_blank">
                LayIM
            </a>
        </div>
    </div>
</div>
        <div class="footer">
            <p>
                <a href="http://fly.layui.com/">
                    Fly社区
                </a>
                2016 &copy;
                <a href="http://www.layui.com/">
                    layui.com
                </a>
            </p>
            <p>
                <a href="http://fly.layui.com/jie/3147.html" target="_blank">
                    产品授权
                </a>
                <a href="http://fly.layui.com/jie/4536.html" target="_blank">
                    获取Fly社区模版
                </a>
                <a href="http://fly.layui.com/jie/2461.html" target="_blank">
                    微信公众号
                </a>
            </p>
        </div>
        
    </body>

</html>